import request from "@/api/index"

export default{
  /**
   * @description: 添加批次 *代表必填
   * @param {Object} params *
   * @return {Object}
   */
   add(params){
    const url = "/batch/productionBatch/add"
    return request.post(url,{
      ...params
    })
  },
  /**
   * @description: 编辑批次 *代表必填
   * @param {Object} params *
   * @return {Object}
   */
   edit(params){
    const url = "/batch/productionBatch/edit"
    return request.post(url,{
      ...params
    })
  },
  /**
   * @description: 完成批次 *代表必填
   * @param {Object} params *
   * @return {Object}
   */
  complete(params){
    const url = "/batch/productionBatch/complete"
    return request.post(url,{
      ...params
    })
  },
  /**
   * @description: 封塘 *代表必填
   * @param {Object} params *
   * @return {Object}
   */
  closePond(params){
    const url = "/batch/productionBatch/closePond"
    return request.post(url,{
      ...params
    })
  },
  /**
   * @description: 单个删除批次 *代表必填
   * @param {String/Number} id *
   * @return {Object}
   */
   delById(params){
    const url = "/batch/productionBatch/delById"
    return request.get(url,{
      ...params
    })
  },
  /**
   * @description: 批量删除批次 *代表必填
   * @param {String/Number} idList *
   * @return {Object}
   */
  delListById(params){
    const url = "/batch/productionBatch/delListById"
    return request.get(url,{
      ...params
    })
  },
  /**
   * @description: 根据鱼塘id查询批次 *代表必填
   * @param {Object} pondId *
   * @return {Object}
   */
  queryBatchByPondId(params){
    const url = "/batch/productionBatch/queryBatchByPondId"
    return request.get(url,params)
   },
  /**
   * @description: 根据鱼塘id查询未完成批次 *代表必填
   * @param {Object} pondId *
   * @return {Object}
   */
  queryBatchByPondIdUnComplete(params){
    const url = "/batch/productionBatch/queryBatchByPondIdUnComplete"
    return request.get(url,params)
   },

  /**
   * @description: 根据鱼塘id查询未完成批次 *代表必填
   * @param {Object} pondId *
   * @return {Object}56465
   */
  productionBatchList(params){
    const url = "/batch/productionBatch/queryUnCompleteAndCreateBatchByPondId"
    return request.get(url,params)
   },
  /**
   * @description: 编号查询 *代表必填
   * @param {Object} params *
   * @return {Object}
   */
  queryById(params){
    const url = "/batch/productionBatch/queryById"
    return request.get(url,params)
   },
  /**
   * @description: 条件查询 *代表必填
   * @param {Object} params *
   * @param {String/Number} page *
   * @param {String/Number} size *
   * @return {Object}
   */
   queryByCondition(params){
    const url = "/batch/productionBatch/queryByCondition"
    return request.post(url,{
      ...params
    })
   },
  /**
   * @description: 分页查询批次 *代表必填
   * @param {Object} params *
   * @param {String/Number} page *
   * @param {String/Number} size *
   * @return {Object}
   */
   queryPageByCondition(params){
    const url = "/batch/productionBatch/queryPageByCondition"
    return request.post(url,{
      ...params
    })
   },
    /**
   * @description: 获取当前基地的养殖信息 *代表必填
   */
    getBreedInfo(params){
      const url = "/batch/batch/getBreedInfo"
      return request.get(url,{
        ...params
      })
     },
  /**
   * @description: 分页查询鱼塘信息 *代表必填
   * @param {Object} params *
   * @param {String/Number} page *
   * @param {String/Number} size *
   * @return {Object}
   */
  queryPondPageByCondition(params){
    const url = "/batch/batch/queryPondByCondition"
    return request.post(url,{
      ...params
    })
  }
}
